-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pruner): Implement full
and bridge
node pruning
#3150
Conversation
146265a
to
1f67976
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3150 +/- ##
==========================================
+ Coverage 51.92% 52.89% +0.97%
==========================================
Files 178 183 +5
Lines 11316 9539 -1777
==========================================
- Hits 5876 5046 -830
+ Misses 4942 3980 -962
- Partials 498 513 +15 ☔ View full report in Codecov by Sentry. |
TODO @renaynay: add some protection in
(can sometimes happen but is non-critical error, just ugly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most importantly all time calculations needs to take care of local machine zone, by using time.Now().UTC()
@renaynay, there is a little conflict fyi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is clean and well-structured. It wasn't hard to digest. I didn't find anything critical, and my review is primarily little nits I discovered and questions. There is one general comment about godocs for methods that need to be improved. Otherwise,
…k time in header test
…increase default max pruneable
…text deadline should be per block
…her tests deterministic and test one more case for retries
…to proper values, sane MaxPruneable values, return gc cycle to every 5 min
…bit more generous, fix log
…ime, simplify ParseFlags
This PR introduces
full
andbridge
node pruning via the--experimental-pruning
flag. Support is included for nodes that start from scratch with pruning enabled and also forarchival
(nodes retaining all historical blocks) that enable the--experimental-pruning
flag.Note that this PR does not support the conversion of a pruned node into an archival one explicitly (it would not support re-syncing deleted blocks).
With pruning enabled,
full
andbridge
nodes' block stores can be expected not to exceed ~4TB (as the upper bound).In follow-up PRs (hardening), the following features can be expected:
TODO:
MaxPruneablePerGC
as now context timeouts are on a per block basis